<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('薪资明细')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-salary-edit" th:object="${hrSalary}">
        <input name="id" th:field="*{id}" type="hidden"><!--修改时传的主键-->
        <div class="form-group">
            <label class="col-sm-3 control-label">一级部门：</label>
            <div class="col-sm-8">
                <!--<select  name="dept" id="dept" class="form-control">-->
                    <!--<option>一级部门（选填）</option>-->
                    <!--<option th:each="pro:${deptinfos}" th:value="${pro.id}" th:field="*{dept}"-->
                            <!--th:text="${pro.dept}"></option>-->
                <!--</select>-->
                <input id="dept" name="dept" class="form-control" type="text" th:field="*{dept}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">二级部门：</label>
            <div class="col-sm-8">
                <!--<select  name="twoDept" id="twoDept" class="form-control">-->
                    <!--<option>二级部门（选填）</option>-->
                    <!--<option th:each="pro:${deptTwoinfos}" th:value="${pro.id}" th:field="*{twoDept}"-->
                            <!--th:text="${pro.twoDept}"></option>-->
                <!--</select>-->
                <input id="twoDept" name="twoDept" class="form-control" type="text" th:field="*{twoDept}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">月份：</label>
            <div class="col-sm-8">
                <select  name="month" id="month" class="form-control" >
                    <option>月份（选填）</option>
                    <option th:each="pro:${monthinfos}" th:value="${pro.id}" th:field="*{month}"
                            th:text="${pro.month}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工号：</label>
            <div class="col-sm-8">
                <input id="jobNumber" name="jobNumber" class="form-control" type="text" th:field="*{jobNumber}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">姓名：</label>
            <div class="col-sm-8">
                <input id="fullName" name="fullName" class="form-control" type="text" th:field="*{fullName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">入职日期：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input id="dateEntry" autocomplete="off" name="dateEntry" class="form-control" placeholder="yyyy-MM-dd" type="text" th:field="*{dateEntry}">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工资总额：</label>
            <div class="col-sm-8">
                <input id="totalWages" name="totalWages" class="form-control" type="text" th:field="*{totalWages}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">其他补助：</label>
            <div class="col-sm-8">
                <input id="otherSubsidies" name="otherSubsidies" class="form-control" type="text" th:field="*{otherSubsidies}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">税前扣款：</label>
            <div class="col-sm-8">
                <input id="taxDeduction" name="taxDeduction" class="form-control" type="text" th:field="*{taxDeduction}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">社保个人：</label>
            <div class="col-sm-8">
                <input id="socialSecurityIndividual" name="socialSecurityIndividual" class="form-control" type="text" th:field="*{socialSecurityIndividual}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">公积金个人：</label>
            <div class="col-sm-8">
                <input id="accumulationFund" name="accumulationFund" class="form-control" type="text" th:field="*{accumulationFund}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">个税：</label>
            <div class="col-sm-8">
                <input id="personalIncomeTax" name="personalIncomeTax" class="form-control" type="text" th:field="*{personalIncomeTax}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">其他扣款：</label>
            <div class="col-sm-8">
                <input id="otherDeductions" name="otherDeductions" class="form-control" type="text" th:field="*{otherDeductions}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">实发金额：</label>
            <div class="col-sm-8">
                <input id="actualAmount" name="actualAmount" class="form-control" type="text" th:field="*{actualAmount}">
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
    var prefix = ctx + "salary";
    $("#form-salary-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-salary-edit').serialize());
        }
    }


    $("input[name='dateEntry']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

</script>
</body>
</html>